/*  1:   */ package org.jetbrains.lang.manifest.highlighting;
/*  2:   */ 
/*  3:   */

import com.intellij.lang.annotation.AnnotationHolder;
import com.intellij.lang.annotation.Annotator;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.lang.manifest.header.HeaderParser;
import org.jetbrains.lang.manifest.header.HeaderParserRepository;
import org.jetbrains.lang.manifest.psi.Header;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public class HeaderAnnotator
/* 12:   */   implements Annotator
/* 13:   */ {
/* 14:   */   private final HeaderParserRepository a;
/* 15:   */   
/* 16:   */   public HeaderAnnotator(@NotNull HeaderParserRepository paramHeaderParserRepository)
/* 17:   */   {
/* 18:42 */     this.a = paramHeaderParserRepository;
/* 19:   */   }
/* 20:   */   
/* 21:   */   public void annotate(@NotNull PsiElement paramPsiElement, @NotNull AnnotationHolder paramAnnotationHolder)
/* 22:   */   {
/* 23:47 */     if (paramPsiElement == null) {
/* 24:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/lang/manifest/highlighting/HeaderAnnotator", "annotate" }));
/* 25:   */     }
/* 26:47 */     if (paramAnnotationHolder == null) {
/* 27:47 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "1", "org/jetbrains/lang/manifest/highlighting/HeaderAnnotator", "annotate" }));
/* 28:   */     }
/* 29:47 */     if ((paramPsiElement instanceof Header))
/* 30:   */     {
/* 31:48 */       Header localHeader = (Header)paramPsiElement;
/* 32:49 */       HeaderParser localHeaderParser = this.a.getHeaderParser(localHeader.getName());
/* 33:50 */       if (localHeaderParser != null) {
/* 34:51 */         localHeaderParser.annotate(localHeader, paramAnnotationHolder);
/* 35:   */       }
/* 36:   */     }
/* 37:   */   }
/* 38:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.lang.manifest.highlighting.HeaderAnnotator

 * JD-Core Version:    0.7.0.1

 */